home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Visual Basic Toolbox
/
Visual Basic Toolbox (P.I.E.)(1996).ISO
/
buttons
/
tkbar
/
config.frm
< prev
next >
Wrap
Text File
|
1993-11-20
|
4KB
|
158 lines
VERSION 2.00
Begin Form frmConfig
BackColor = &H00C0C0C0&
BorderStyle = 3 'Fixed Double
Caption = "Configure"
ClientHeight = 2175
ClientLeft = 1170
ClientTop = 1560
ClientWidth = 3660
Height = 2610
KeyPreview = -1 'True
Left = 1095
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 2175
ScaleWidth = 3660
Top = 1200
Width = 3810
Begin CommandButton cmdCancel
BackColor = &H00000000&
Caption = "Cancel"
Height = 435
Left = 2220
TabIndex = 4
Top = 1020
Width = 1215
End
Begin CommandButton cmdOk
BackColor = &H00000000&
Caption = "OK"
Default = -1 'True
Height = 435
Left = 2220
TabIndex = 3
Top = 480
Width = 1215
End
Begin SSFrame fraOrient
Caption = "Grid Size"
Font3D = 0 'None
Height = 1275
Left = 180
TabIndex = 5
Top = 345
Width = 1755
Begin TextBox txtCols
Height = 315
Left = 960
TabIndex = 1
Top = 720
Width = 555
End
Begin TextBox txtRows
Height = 315
Left = 960
TabIndex = 0
Top = 300
Width = 555
End
Begin Label Label2
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Columns:"
Height = 195
Left = 120
TabIndex = 7
Top = 840
Width = 780
End
Begin Label Label1
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Rows:"
Height = 195
Left = 360
TabIndex = 6
Top = 420
Width = 540
End
End
Begin CheckBox chkOnTop
BackColor = &H00C0C0C0&
Caption = "Always On Top"
Height = 285
Left = 180
TabIndex = 2
Top = 1725
Width = 1650
End
Begin Label lblItemCount
AutoSize = -1 'True
BackColor = &H00C0C0C0&
Caption = "Item Count"
ForeColor = &H00C00000&
Height = 195
Left = 225
TabIndex = 8
Top = 75
Width = 930
End
End
Option Explicit
Sub cmdCancel_Click ()
Unload Me
End Sub
Sub cmdOk_Click ()
Dim Cond1%, Cond2%
Cond1 = (Val(txtRows.Text) <= 0 Or Val(txtCols.Text) <= 0)
Cond2 = ((Val(txtRows.Text) * Val(txtCols.Text)) < gActualItemCt)
If Cond1 Or Cond2 Then
MsgBadNews "Invalid grid size setting."
Else
gOnTop = (chkOnTop.Value = 1)
gGridRows = Val(txtRows.Text)
gGridCols = Val(txtCols.Text)
Unload Me
ButtonBarDraw
End If
End Sub
Sub Form_KeyPress (KeyAscii As Integer)
If KeyAscii = 27 Then Call cmdCancel_Click
End Sub
Sub Form_Load ()
txtRows.Text = LTrim$(Str$(gGridRows))
txtCols.Text = LTrim$(Str$(gGridCols))
chkOnTop.Value = Abs(gOnTop)
lblItemCount.Caption = "Note: " & Str$(gActualItemCt) & " items total"
CenterForm Me
End Sub
Sub txtCols_KeyPress (KeyAscii As Integer)
Select Case KeyAscii
Case 8, 9, 10, 13
Case Is < Asc("0")
KeyAscii = 0
Case Is > Asc("9")
KeyAscii = 0
End Select
End Sub
Sub txtRows_KeyPress (KeyAscii As Integer)
Select Case KeyAscii
Case 8, 9, 10, 13
Case Is < Asc("0")
KeyAscii = 0
Case Is > Asc("9")
KeyAscii = 0
End Select
End Sub